import { Entity, CreateDate, UpdateDate, PrimaryUuid, Title, Image, ShopCategoryId, DisplayOrder, SysUserId, Boolean, ManyToOne, JoinColumn, CreateUserId, Tree, TreeParent } from '@sker/core'
@Entity({
    name: 'shop_category'
})
export class ShopCategory {
    static title: string = `商品分类`;
    static resource: string = `shop_category`;

    @PrimaryUuid({
        primaryKeyConstraintName: "PK_SHOP_CATEGORY_ID"
    })
    id!: string;

    @Title({ comment: '分类名' })
    title!: string;

    @Image({ comment: '缩略图', nullable: true, default: '' })
    cover!: string;

    @ShopCategoryId({ comment: '上级分类', nullable: true })
    pid!: string;

    @DisplayOrder({ comment: '顺序', nullable: true, default: 0 })
    displayorder!: number;

    @Boolean({ comment: '启用', default: true })
    status!: boolean;

    @CreateUserId({ comment: '创建人' })
    create_uid!: string;

    @CreateDate({
        comment: '创建日期'
    })
    create_date!: Date;


    @UpdateDate({
        comment: '更新日期'
    })
    update_date!: Date;
}
